 <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>账户管理</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">

<link
	href="//staticnew.mayi.com/resourcesWeb/css/global.css?V=201508071525"
	rel="stylesheet" type="text/css" />
<link
	href="//staticnew.mayi.com/resourcesWeb/css/PCenter.css?V=20160715"
	rel="stylesheet" type="text/css" />
<link href="//staticnew.mayi.com/resourcesWeb/css/collection.css"
	rel="stylesheet" type="text/css">
<link
	href="//staticnew.mayi.com/resourcesWeb/css/account.css?v=20160616"
	rel="stylesheet" type="text/css" />
<link
	href="//staticnew.mayi.com/resourcesWeb/css/landlord/manage_pub.css"
	rel="stylesheet" type="text/css" />
<link
	href="//staticnew.mayi.com/resourcesWeb/v201510/css/public_element.css"
	rel="stylesheet" type="text/css">
<link href="//staticnew.mayi.com/resourcesWeb/css/cropper.css"
	rel="stylesheet" type="text/css">


<script type="text/javascript" src="js/public/jquery.1.9.1.js"></script>

<script type="text/javascript">
	//切换个人信息与密码设置窗口1
	$(function() {
		var CenterTab = $('.centerTab li')
		CenterTab.each(function(e) {
			CenterTab.eq(e).click(function() {
				$(this).addClass('active').siblings().removeClass('active');
				$('.MtList').eq(e).show().siblings().hide();
				$(".discountManageUl a").removeClass("on").eq(e).addClass("on");
			});
		});
		//切换个人信息与密码设置窗口2
		$(".discountManageUl a").click(function() {
			var Index = $(this).index();
			$(this).siblings("li").removeClass("on");
			$(this).addClass("on");
			$(".centerTab li").eq(Index).click();
		//event.stopPropagation();
		//return false;
		})

		$(".settlement_way").click(function() {
			$(".discountManageUl a").eq(1).click();
		})

		$(".discountManageUl a").eq(0).addClass("on");
	});
</script>
</head>

<body>
<!-- Content -->
<div class="main">
	<ul class="breadcrumb clearfix">
		<li><a href="jsp/myOrders.jsp">我是房东</a> <span
			class="divider">》</span></li>
		<li>我的设置</li>
	</ul>

	<div class="personalCenter clearfix">
		<ul class="center-sidebar">
			<li><a class="discountManage" href="jsp/landlord.jsp">订单管理<span
					class="ddgl_current"></span></a></li>
			<li><a href="/user/landlord/roommanager">房源管理<span
					class="fygl"></span></a></li>
			<li><a href="/landlord/867556835/settlements">结算管理<span
					class="jsgl"></span></a></li>	
			<li style="position:relative" class="slideactive"><a
				style="overflow:visible; height: 38px" href="jsp/landlordInfo.jsp">我的设置<span class="zhgl"></span></a>
			</li>
		</ul>
		
		<!-- Center-sidebar END -->
		<div class="centerCon">
			<ul class="centerTab">
				<li class="active">个人信息</li>
				<li>密码设置</li>
			</ul>
			<div class="accountMt clearfix">
			
				<!-- 个人信息 -->
				<input type="hidden" name="issetpass" id="issetpass" value="false" />
				<input type="hidden" name="isbandmobile" id="isbandmobile"
					value="false" /> <input type="hidden" name="usertype"
					id="usertype" value="tenant" /> <input type="hidden"
					name="bjlandlord" id="bjlandlord" value="0" />
				<div class="MtList" style="display:block;">
					<div class="avatar-box">
						<div class="avatar" id="headimage_div">
							<img id="headImg" style="width:100px;height:100px;"
								src="https://i1.mayi.com/gjfs15/M06/C7/19/CgEHQFcxdRfgpEk7AABlcbtch,g688.jpg_240x240c.jpg"
								alt="" />
						</div>
						<p>
							<a id="upheadimgdo" class="alertAvatar" rel="nofollow"
								href="javascript:void(0)">[修改头像]</a>
						</p>

					</div>
					<div class="tabCon">
						<ul class="userInfo">
							<!-- 用户ID -->
							<li class="clearfix"><span class="infoTitle">用&nbsp;户&nbsp;名：</span><span id="landlordID">1</span></li>
							<!-- 昵称 -->
							<li class="clearfix"><span class="infoTitle">昵&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;称：</span>
								<input class="personLargeInput" type="text" name="nickname" id="nickname" value="" /></li>
							<!-- 真实姓名 -->
							<li class="clearfix"><span class="infoTitle">真实姓名：</span> 
							<input class="personLargeInput" type="text" name="realname" id="realname" value="" /> 
							</li>
							<!-- 身份证号 -->
							<li class="clearfix"><span class="infoTitle">身份证号：</span>
								<input class="personLargeInput" type="text" name="CardID"
								id="CardID" value="" /> 
							</li>
							<!-- 性别 -->
							<li class="clearfix"><span class="infoTitle">性&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;别：</span>
								<select class="ccitySelect" id="sex" name="sex">
									<option value="">-请选择-</option>
									<option value="男">男</option>
									<option value="女" selected="selected">女</option>
								</select>
							</li>
							<!-- 年龄 -->
							<li class="clearfix"><span class="infoTitle">年&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;龄：</span>
								<input class="personLargeInput" type="text" name="age" id="age" value="" /> 
							</li>
							<!-- 邮箱 -->
							<li class="clearfix"><span class="infoTitle">邮&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;箱：</span>
								<input class="personLargeInput" type="text" name="email" id="email" value="" /> 
							</li>
							<!-- 手机号 -->
							<li class="clearfix" id="mobile_div">
								<span class="infoTitle">手机号码：</span> 
								<input class="personLargeInput" type="text" name="mobile" id="mobile" value="" style="color:#000;" /> 
								<i class="code-i" id="code" name="code" code="86">+86</i>
							</li>
							
						</ul>
						<div class="submit-wrap">
							<a id="saveuser" class="save-btn" rel="nofollow"
								 onclick="upMyInfo()">保存</a>
						</div>
					</div>
				</div>
				<!-- 个人信息 END -->
				<!-- 密码设置 START -->
				<div class="MtList">
					<input type="hidden" name="issetpass" id="issetpass" value="false" />
					<input type="hidden" name="isbandmobile" id="isbandmobile"
						value="false" />
					<ul class="userInfo">
						<li class="clearfix"><span class="infoTitle">用
								&nbsp;户&nbsp;名：</span> #t_867299774</li>
						<li class="clearfix"><span class="infoTitle">输入密码：</span> <input
							type="password" value="" name="newpass" id="newpass"
							class="personLargeInput" /> <span class="prompt"
							id="newpassspan" name="newpassspan">6-16个字符</span></li>
						<li class="clearfix"><span class="infoTitle">确认密码：</span> <input
							type="password" value="" name="repass" id="repass"
							class="personLargeInput" /> <span class="prompt" id="repassspan"
							name="repassspan">重复输入一次密码</span> <!--<span class="prompterror">两次密码不一致</span>-->
						</li>
					</ul>
					<div class="submit-wrap">
						<a class="save-btn" id="savepassbtn" name="savepassbtn"
							rel="nofollow" href="javascript:void(0)" onclick="changePassword()">保存</a>
					</div>
				</div>
				<!-- 密码设置 END-->


			</div>
		</div>
	</div>
</div>	
</body>
<script type="text/javascript">
	function upMyInfo(){
	$.ajax({
		url : "updateLandlordInfo.action",
		type : "post",
		data :{
			 "l_id" : $("#landlordID").html(),  //用户ID
			 "headImg" : $("#headImg").val(),  //头像
			 "nickname" : $("#nickname").val(),	//昵称
			 "realname" :  $("#realname").val(),	//姓名
			 "CardID" :$("#CardID").val(),	//身份证号
			 "sex" : $("#sex").val(),
			 "age" : $("#age").val(),
			 "email" : $("#email").val(),
			 "mobile" :$("#mobile").val()
		},
		success : function(result) {
			alert(result);//提示修改成功
		}
	});
}
function showMyInfo(){
	$.ajax({
		url : "showLandlordInfo.action",
		type : "post",
		data : {
			 "l_id" : $("#landlordID").html(),  //房东ID
		},
		success : function(result) {
			$("#headImg").val(result.l_l_headImg);
			$("#nickname").val(result.l_l_nickName);
			$("#realname").val(result.l_l_name);
			$("#sex").val(result.l_l_sex);
			$("#age").val(result.l_l_age);
			$("#mobile").val(result.l_l_phone);
			$("#CardID").val(result.l_l_cardId);	
			$("#email").val(result.l_l_email);		
		}
	});
}
showMyInfo();
</script>
</html>
